package com.sutuijingling.utils;

import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.Random;

public class NumberUtil {
    public static final Long a = Long.valueOf(0);
    public static final Double b = Double.valueOf(0.0d);
    public static final Integer c = Integer.valueOf(0);
    public static final Integer d = Integer.valueOf(1);
    public static final Integer e = Integer.valueOf(Integer.MIN_VALUE);
    public static final Integer f = Integer.valueOf(-64);
    public static final Long g = Long.valueOf(1);
    public static final NumberFormat h = NumberFormat.getPercentInstance();
    public static final NumberFormat i = new DecimalFormat("######0.00");
    public static final NumberFormat j = new DecimalFormat("######0.0000");
    public static final Long[] k = new Long[0];
    public static final String[] l = new String[0];
    static Random m = new Random();

    public interface Addable extends Cloneable {
        void add(Object obj);

        Addable clone() throws CloneNotSupportedException;

        int getSumNum();

        int sumNumPlus();
    }

    public @interface NoAdd {
    }

    public static final int a(Object obj, int i) {
        if (obj == null) {
            return i;
        }
        try {
            return obj instanceof Integer ? ((Integer) obj).intValue() : obj instanceof Number ? ((Number) obj).intValue() : Integer.parseInt(obj.toString());
        } catch (Exception e) {
            return i;
        }
    }

    public static final Long a(String str, Long l) {
        try {
            l = Long.valueOf(str);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return l;
    }
}
